package com.avidys.jwom.server;


import java.io.Serializable;
import java.util.Date;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

import com.avidys.common.gwt.game.wom.model.Server;
import com.google.appengine.api.datastore.Key;
import com.google.appengine.api.users.User;

@PersistenceCapable(identityType = IdentityType.APPLICATION, detachable = "false")
public class ServerJDO implements Serializable {

    @PrimaryKey
    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY, serialized = "true")
    public Key key;

    @Persistent(serialized = "true")
    public User user;

    @Persistent(serialized = "true")
    public String url;

    @Persistent(serialized = "true")
    public String name;

    @Persistent(serialized = "true")
    public String desc;

    @Persistent(serialized = "true")
    public Date date;

    public ServerJDO() {
    	super();
    }

    public ServerJDO(String url, String name, String desc, Date date) {
		this.url = url;
		this.name = name;
        this.desc = desc;
        this.date = date;
    }

    public ServerJDO(Server s) {
		this.url = s.url;
		this.name = s.name;
        this.desc = s.desc;
        this.date = s.date;
	}

	public String getUrl() {
    	return this.url;
    }
    
    
    
}